const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports ={
    mode:'development',
    entry:[path.join(__dirname,'src/app.js'),path.join(__dirname,'src/main.js')],
    output:{
        filename:'index.js',
        path:path.join(__dirname,'./dist'),
    },
    module:{
        rules:[
            {
                test:/\.html/,
                use:['html-loader']
            },
            {
                test:/\.css/,
                use:['style-loader','css-loader']
            },
            {
                test:/\.(png|jpg|gif)$/i,
                use:['file-loader']
            }
        ]
    },
    plugins:[
        new HtmlWebpackPlugin({
            filename:'index.html',
            template:'./public/index.html'

        })
    ],
    resolve:{
        alias:{
            'vue$':'vue/dist/vue.esm.js',
            '@':path.join(__dirname,'./src')
        }
    },
    devServer:{
        port:8080,
        host:'0.0.0.0',
        quiet:true,
        inline:true,
    }

}